package cn.kgc.jdktest.demo4;

/**
 * @Author:yaozhaobao
 * @Description:TODO
 * @version:1.0
 */
public class Test {

    public static void main(String[] args) {
        invokeDinnerCook(new Cook() {
            @Override
            public void makefood() {
                System.out.println("做晚饭");
            }
        });

        invokeDinnerCook(()->{
            System.out.println("做晚饭");
        });

        invokeDinnerCook(()-> System.out.println("做晚饭"));
    }


    public  static void invokeDinnerCook(Cook cook){
        cook.makefood();
    }
}
